The present invention relates in general to image data processing, and in particular to a more efficient and cost-effective method and apparatus for compressing data received from an image sensor.
Digital image data compression techniques have been developed to dramatically improve the efficiency in image data storage and processing. Taking advantage of redundancies inherent in natural imagery, image data encoding and compression allow for faster transmission of images, lower power consumption, and more compact image storage. Various compression algorithms have been defined by industry standards groups such as the Joint Photographic Experts Group (JPEG) that has defined the compression standard for still picture data, and the Moving Picture Experts Group (MPEG) that has defined the compression algorithm for video, audio, and system bit stream.
The JPEG and MPEG video compression algorithms are based on discrete cosine transform (DCT) and inter-frame motion compensation (see, ISO/IEC JTC1/SC29/WG11, Information Technologyxe2x80x94Coding of Moving Pictures and Associated Audio for Digital Storage Media). FIG. 1 is a block diagram illustrating data compression in the conventional DCT-based mode. As shown in FIG. 1, a forward DCT (FDCT) block 10 receives image data from an image sensor 20 and performs the DCT operation for removing redundancy data from the image data. A quantizer 12 independently performs quantization by classifying the DCT coefficient values from the FDCT 10 into a DC component and an AC component based on a quantization table. An entropy encoder 14 compresses the data by arranging the AC coefficients in a row through a differential DC coefficient coding and a zig-zag scan.
Implementation of this type of DCT-based data compression algorithm requires a large number of multipliers and adders, and usually imposes a relatively heavy burden on the hardware. Similarly heavy burdens are placed on the recovery side of the system where data is decompressed by a process that performs essentially the reverse of the above. This hardware intensive approach results in large and complex circuitry and increase manufacturing costs.
The present invention provides method and apparatus for compressing image data that are efficient and more cost effective to implement. The data compression technique of the present invention is particularly suitable for use with image sensors that use Bayer pattern for the pixel array. Broadly, the data compression technique according to the present invention first extracts the R/G/B values from the sensed image data. It then divides the extracted values by a programmable loss factor and obtains a difference value between the current and previous R/G/B values (e.g., performs differential pulse coded modulationxe2x80x94DPCM). The output is then variable length encoded and packetized for transmission as compressed image.
The resulting compression ratio according to this technique is lower than the DCT-based compression techniques, but it drastically reduces hardware complexity (i.e., gate count) and enables more efficient systems implementations (e.g., integration on a USB controller chip). The image data compression technique of the present invention therefore provides a much more desirable alternative for those applications that do not require maximum compression ratios.
Accordingly, in one embodiment, the present invention provides an image compression apparatus for compressing image data received from an image sensor, the system including a color extraction unit coupled to receive input image data from the image sensor, the color extraction unit being configured to extract red, green and blue color values; a compression unit coupled to the color extraction unit configured to divide down the color values by a selected factor; a variable length encoder coupled to the compression unit and configured to perform variable length encoding on the output of compression unit; and a data packet unit coupled to the variable length encoder configured to packetize compressed data for transmission.
In another embodiment, the present invention provides a method for compressing image data received from an image sensor, the method including the steps of extracting red, green and blue color values from the image data; dividing color values by a selected loss factor; obtaining difference values between current color values and previous color values; and encoding each difference value into a specific color value in response to a size of the difference value.
A better understanding of the nature and advantages of the image compression method and apparatus according to the present invention may be gained with reference to the detailed description and the accompanying drawings below.